import express from "express"

import { getAllUsers, deleteUser, updateUserbyId } from "../controllers/users"
import { isAuthenticated, isOwner } from "../middlewares"

export default (router: express.Router): void => {
  router.get('/users', isAuthenticated, getAllUsers)
  router.delete('/users/:id', isAuthenticated, isOwner, deleteUser)
  router.patch('/users/:id', isAuthenticated, isOwner, updateUserbyId)
}

